body {
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  margin: 0;
  padding: 0;
}
.baidu-header {
  text-align: center;
  margin-top: 80px;
  margin-bottom: 30px;
}
.baidu-logo {
  font-size: 48px;
  color: #2319dc;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}
.custom-select {
  width: 70px;
  position: relative;
  cursor: pointer;
  overflow: visible;
}
.select-header {
  height: 38px;
  border: 1px solid #c4c7ce;
  border-radius: 6px 0 0 6px;
  padding: 0 8px;
  font-size: 16px;
  color: #333;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.select-header:hover {
  border-color: #4e6ef2;
}
.selected-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.select-options {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #c4c7ce;
  border-radius: 6px;
  margin-top: 5px;
  max-height: 300px;
  overflow-y: auto;
  padding-top: 5px;

.search-dropdown {
  width: calc(100% - 42px);
  margin: 0 8px 8px 8px;
  padding: 6px 12px;
  border: 1px solid #c4c7ce;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.search-dropdown:focus {
  border-color: #4e6ef2;
}
  display: none;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.option {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.option:hover {
  background-color: #f0f2ff;
}
.checkmark {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #c4c7ce;
  border-radius: 3px;
  margin-right: 8px;
  position: relative;
}
.option.selected .checkmark {
  background-color: #4e6ef2;
  border-color: #4e6ef2;
}
.option.selected .checkmark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.arrow {
  transition: transform 0.2s;
}
.custom-select.open .arrow {
  transform: rotate(180deg);
}
.custom-select.open .select-options {
  display: block;
}
#repoSelect[multiple] {
  padding-right: 30px;
}
#repoSelect[multiple] option {
  padding-left: 25px;
  position: relative;
}
#repoSelect[multiple] option::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #c4c7ce;
  border-radius: 3px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
#repoSelect[multiple] option:checked::before {
  background-color: #4e6ef2;
  border-color: #4e6ef2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
#repoSelect:focus {
  border-color: #4e6ef2;
  box-shadow: 0 0 0 2px rgba(78, 110, 242, 0.2);
}
#repoSelect option {
  padding: 6px 8px;
  position: relative;
}
#repoSelect option::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #c4c7ce;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}
#repoSelect option:checked::before {
  background-color: #4e6ef2;
  border-color: #4e6ef2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
#repoSelect option:hover {
  background-color: #f0f2ff;
}
.search-input {
  width: 460px;
  height: 38px;
  border: 1px solid #c4c7ce;
  border-radius: 0;
  padding: 0 16px;
  font-size: 18px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s;
}
.search-input:focus {
  border-color: #4e6ef2;
}
.search-btn {
  height: 40px;
  border: none;
  background: #4e6ef2;
  color: #fff;
  font-size: 18px;
  border-radius: 0 8px 8px 0;
  padding: 0 28px;
  cursor: pointer;
  transition: background 0.2s;
}
.search-btn:hover {
  background: #4664d2;
}
.search-btn[disabled] {
  background: #bababa;
}
#result {
  max-width: 90%;
  margin: 0 auto 32px auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 1px 16px 16px 16px;
  min-height: 120px;
  color: #333;
  word-wrap: break-word;
  font-family: monospace;
}
.group-title {
  font-size: 1.2em;
  color: #333;
  margin: 20px 0 12px 0;
  padding: 8px 12px;
  background: #f5f7fa;
  border-radius: 6px;
  border-left: 4px solid #4e6ef2;
}
.subgroup-title {
  font-size: 1em;
  color: #666;
  margin: 10px 0 0 20px;
  padding: 6px 12px;
  background: #f8f9fc;
  border-radius: 4px;
  border-left: 3px solid #8a98e6;
}
.search-result-item {
  margin-left: 40px;
  background: #f8f9fc;
}
@media (max-width: 600px) {
  .subgroup-title {
    margin-left: 10px;
    font-size: 16px;
  }
  .search-result-item {
    margin-left: 20px;
  }
}
.search-result-item {
  margin-left: 20px;
  padding: 6px 0;
}
.result-code {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.code-line {
  padding-left: 15px;
}
.line-number {
  color: #666;
  min-width: 30px;
  text-align: right;
  user-select: none;
}
.line-content {
  flex-grow: 1;
}
@media (max-width: 600px) {
  .line-number {
    min-width: 25px;
    font-size: 14px;
  }
}
.result-title {
  font-size: 20px;
  color: #1a0dab;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}
.result-title:hover {
  text-decoration: underline;
}
.result-meta {
  font-size: 14px;
  color: #666;
  margin: 6px 0 4px 0;
}
.result-code {
  background: #f5f7fa;
  border-radius: 4px;
  padding: 8px 12px;
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-size: 15px;
  margin-top: 4px;
  white-space: pre-wrap;
}
.highlight {
  background: #fff59d;
  color: #d32f2f;
  font-weight: bold;
  padding: 0 2px;
  border-radius: 2px;
}
@media (max-width: 600px) {
  .search-input { width: 48vw; font-size: 16px; }
  .search-btn { padding: 0 14px; }
  #result { padding: 6px 3vw; max-width: 86%; }
  .group-title:first-child { margin-top: 10px; }
  .file-section:last-child { margin-bottom: 10px; }
}